﻿using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using Google.Protobuf;
using Google.Protobuf.Collections;
using Google.Protobuf.Reflection;

namespace EggLink.DanhengServer.Proto
{
	// Token: 0x020002F3 RID: 755
	[DebuggerDisplay("{ToString(),nq}")]
	public sealed class ClientMail : IMessage<ClientMail>, IMessage, IEquatable<ClientMail>, IDeepCloneable<ClientMail>, IBufferMessage
	{
		// Token: 0x170009BE RID: 2494
		// (get) Token: 0x060021B6 RID: 8630 RVA: 0x0005F2F2 File Offset: 0x0005D4F2
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageParser<ClientMail> Parser
		{
			get
			{
				return ClientMail._parser;
			}
		}

		// Token: 0x170009BF RID: 2495
		// (get) Token: 0x060021B7 RID: 8631 RVA: 0x0005F2F9 File Offset: 0x0005D4F9
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageDescriptor Descriptor
		{
			get
			{
				return ClientMailReflection.Descriptor.MessageTypes[0];
			}
		}

		// Token: 0x170009C0 RID: 2496
		// (get) Token: 0x060021B8 RID: 8632 RVA: 0x0005F30B File Offset: 0x0005D50B
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		MessageDescriptor IMessage.Descriptor
		{
			get
			{
				return ClientMail.Descriptor;
			}
		}

		// Token: 0x060021B9 RID: 8633 RVA: 0x0005F312 File Offset: 0x0005D512
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public ClientMail()
		{
		}

		// Token: 0x060021BA RID: 8634 RVA: 0x0005F348 File Offset: 0x0005D548
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public ClientMail(ClientMail other) : this()
		{
			this.content_ = other.content_;
			this.expireTime_ = other.expireTime_;
			this.templateId_ = other.templateId_;
			this.title_ = other.title_;
			this.attachment_ = ((other.attachment_ != null) ? other.attachment_.Clone() : null);
			this.isRead_ = other.isRead_;
			this.sender_ = other.sender_;
			this.mailType_ = other.mailType_;
			this.paraList_ = other.paraList_.Clone();
			this.time_ = other.time_;
			this.id_ = other.id_;
			this._unknownFields = UnknownFieldSet.Clone(other._unknownFields);
		}

		// Token: 0x060021BB RID: 8635 RVA: 0x0005F405 File Offset: 0x0005D605
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public ClientMail Clone()
		{
			return new ClientMail(this);
		}

		// Token: 0x170009C1 RID: 2497
		// (get) Token: 0x060021BC RID: 8636 RVA: 0x0005F40D File Offset: 0x0005D60D
		// (set) Token: 0x060021BD RID: 8637 RVA: 0x0005F415 File Offset: 0x0005D615
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public string Content
		{
			get
			{
				return this.content_;
			}
			set
			{
				this.content_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
			}
		}

		// Token: 0x170009C2 RID: 2498
		// (get) Token: 0x060021BE RID: 8638 RVA: 0x0005F428 File Offset: 0x0005D628
		// (set) Token: 0x060021BF RID: 8639 RVA: 0x0005F430 File Offset: 0x0005D630
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public long ExpireTime
		{
			get
			{
				return this.expireTime_;
			}
			set
			{
				this.expireTime_ = value;
			}
		}

		// Token: 0x170009C3 RID: 2499
		// (get) Token: 0x060021C0 RID: 8640 RVA: 0x0005F439 File Offset: 0x0005D639
		// (set) Token: 0x060021C1 RID: 8641 RVA: 0x0005F441 File Offset: 0x0005D641
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint TemplateId
		{
			get
			{
				return this.templateId_;
			}
			set
			{
				this.templateId_ = value;
			}
		}

		// Token: 0x170009C4 RID: 2500
		// (get) Token: 0x060021C2 RID: 8642 RVA: 0x0005F44A File Offset: 0x0005D64A
		// (set) Token: 0x060021C3 RID: 8643 RVA: 0x0005F452 File Offset: 0x0005D652
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public string Title
		{
			get
			{
				return this.title_;
			}
			set
			{
				this.title_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
			}
		}

		// Token: 0x170009C5 RID: 2501
		// (get) Token: 0x060021C4 RID: 8644 RVA: 0x0005F465 File Offset: 0x0005D665
		// (set) Token: 0x060021C5 RID: 8645 RVA: 0x0005F46D File Offset: 0x0005D66D
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public ItemList Attachment
		{
			get
			{
				return this.attachment_;
			}
			set
			{
				this.attachment_ = value;
			}
		}

		// Token: 0x170009C6 RID: 2502
		// (get) Token: 0x060021C6 RID: 8646 RVA: 0x0005F476 File Offset: 0x0005D676
		// (set) Token: 0x060021C7 RID: 8647 RVA: 0x0005F47E File Offset: 0x0005D67E
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool IsRead
		{
			get
			{
				return this.isRead_;
			}
			set
			{
				this.isRead_ = value;
			}
		}

		// Token: 0x170009C7 RID: 2503
		// (get) Token: 0x060021C8 RID: 8648 RVA: 0x0005F487 File Offset: 0x0005D687
		// (set) Token: 0x060021C9 RID: 8649 RVA: 0x0005F48F File Offset: 0x0005D68F
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public string Sender
		{
			get
			{
				return this.sender_;
			}
			set
			{
				this.sender_ = ProtoPreconditions.CheckNotNull<string>(value, "value");
			}
		}

		// Token: 0x170009C8 RID: 2504
		// (get) Token: 0x060021CA RID: 8650 RVA: 0x0005F4A2 File Offset: 0x0005D6A2
		// (set) Token: 0x060021CB RID: 8651 RVA: 0x0005F4AA File Offset: 0x0005D6AA
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public MailType MailType
		{
			get
			{
				return this.mailType_;
			}
			set
			{
				this.mailType_ = value;
			}
		}

		// Token: 0x170009C9 RID: 2505
		// (get) Token: 0x060021CC RID: 8652 RVA: 0x0005F4B3 File Offset: 0x0005D6B3
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public RepeatedField<string> ParaList
		{
			get
			{
				return this.paraList_;
			}
		}

		// Token: 0x170009CA RID: 2506
		// (get) Token: 0x060021CD RID: 8653 RVA: 0x0005F4BB File Offset: 0x0005D6BB
		// (set) Token: 0x060021CE RID: 8654 RVA: 0x0005F4C3 File Offset: 0x0005D6C3
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public long Time
		{
			get
			{
				return this.time_;
			}
			set
			{
				this.time_ = value;
			}
		}

		// Token: 0x170009CB RID: 2507
		// (get) Token: 0x060021CF RID: 8655 RVA: 0x0005F4CC File Offset: 0x0005D6CC
		// (set) Token: 0x060021D0 RID: 8656 RVA: 0x0005F4D4 File Offset: 0x0005D6D4
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Id
		{
			get
			{
				return this.id_;
			}
			set
			{
				this.id_ = value;
			}
		}

		// Token: 0x060021D1 RID: 8657 RVA: 0x0005F4DD File Offset: 0x0005D6DD
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override bool Equals(object other)
		{
			return this.Equals(other as ClientMail);
		}

		// Token: 0x060021D2 RID: 8658 RVA: 0x0005F4EC File Offset: 0x0005D6EC
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool Equals(ClientMail other)
		{
			return other != null && (other == this || (!(this.Content != other.Content) && this.ExpireTime == other.ExpireTime && this.TemplateId == other.TemplateId && !(this.Title != other.Title) && object.Equals(this.Attachment, other.Attachment) && this.IsRead == other.IsRead && !(this.Sender != other.Sender) && this.MailType == other.MailType && this.paraList_.Equals(other.paraList_) && this.Time == other.Time && this.Id == other.Id && object.Equals(this._unknownFields, other._unknownFields)));
		}

		// Token: 0x060021D3 RID: 8659 RVA: 0x0005F5E0 File Offset: 0x0005D7E0
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override int GetHashCode()
		{
			int num = 1;
			if (this.Content.Length != 0)
			{
				num ^= this.Content.GetHashCode();
			}
			if (this.ExpireTime != 0L)
			{
				num ^= this.ExpireTime.GetHashCode();
			}
			if (this.TemplateId != 0U)
			{
				num ^= this.TemplateId.GetHashCode();
			}
			if (this.Title.Length != 0)
			{
				num ^= this.Title.GetHashCode();
			}
			if (this.attachment_ != null)
			{
				num ^= this.Attachment.GetHashCode();
			}
			if (this.IsRead)
			{
				num ^= this.IsRead.GetHashCode();
			}
			if (this.Sender.Length != 0)
			{
				num ^= this.Sender.GetHashCode();
			}
			if (this.MailType != MailType.Normal)
			{
				num ^= this.MailType.GetHashCode();
			}
			num ^= this.paraList_.GetHashCode();
			if (this.Time != 0L)
			{
				num ^= this.Time.GetHashCode();
			}
			if (this.Id != 0U)
			{
				num ^= this.Id.GetHashCode();
			}
			if (this._unknownFields != null)
			{
				num ^= this._unknownFields.GetHashCode();
			}
			return num;
		}

		// Token: 0x060021D4 RID: 8660 RVA: 0x0005F718 File Offset: 0x0005D918
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override string ToString()
		{
			return JsonFormatter.ToDiagnosticString(this);
		}

		// Token: 0x060021D5 RID: 8661 RVA: 0x0005F720 File Offset: 0x0005D920
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void WriteTo(CodedOutputStream output)
		{
			output.WriteRawMessage(this);
		}

		// Token: 0x060021D6 RID: 8662 RVA: 0x0005F72C File Offset: 0x0005D92C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalWriteTo(ref WriteContext output)
		{
			if (this.Content.Length != 0)
			{
				output.WriteRawTag(26);
				output.WriteString(this.Content);
			}
			if (this.Id != 0U)
			{
				output.WriteRawTag(32);
				output.WriteUInt32(this.Id);
			}
			if (this.ExpireTime != 0L)
			{
				output.WriteRawTag(48);
				output.WriteInt64(this.ExpireTime);
			}
			this.paraList_.WriteTo(ref output, ClientMail._repeated_paraList_codec);
			if (this.Title.Length != 0)
			{
				output.WriteRawTag(66);
				output.WriteString(this.Title);
			}
			if (this.attachment_ != null)
			{
				output.WriteRawTag(74);
				output.WriteMessage(this.Attachment);
			}
			if (this.Time != 0L)
			{
				output.WriteRawTag(80);
				output.WriteInt64(this.Time);
			}
			if (this.Sender.Length != 0)
			{
				output.WriteRawTag(90);
				output.WriteString(this.Sender);
			}
			if (this.MailType != MailType.Normal)
			{
				output.WriteRawTag(96);
				output.WriteEnum((int)this.MailType);
			}
			if (this.TemplateId != 0U)
			{
				output.WriteRawTag(104);
				output.WriteUInt32(this.TemplateId);
			}
			if (this.IsRead)
			{
				output.WriteRawTag(120);
				output.WriteBool(this.IsRead);
			}
			if (this._unknownFields != null)
			{
				this._unknownFields.WriteTo(ref output);
			}
		}

		// Token: 0x060021D7 RID: 8663 RVA: 0x0005F888 File Offset: 0x0005DA88
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public int CalculateSize()
		{
			int num = 0;
			if (this.Content.Length != 0)
			{
				num += 1 + CodedOutputStream.ComputeStringSize(this.Content);
			}
			if (this.ExpireTime != 0L)
			{
				num += 1 + CodedOutputStream.ComputeInt64Size(this.ExpireTime);
			}
			if (this.TemplateId != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.TemplateId);
			}
			if (this.Title.Length != 0)
			{
				num += 1 + CodedOutputStream.ComputeStringSize(this.Title);
			}
			if (this.attachment_ != null)
			{
				num += 1 + CodedOutputStream.ComputeMessageSize(this.Attachment);
			}
			if (this.IsRead)
			{
				num += 2;
			}
			if (this.Sender.Length != 0)
			{
				num += 1 + CodedOutputStream.ComputeStringSize(this.Sender);
			}
			if (this.MailType != MailType.Normal)
			{
				num += 1 + CodedOutputStream.ComputeEnumSize((int)this.MailType);
			}
			num += this.paraList_.CalculateSize(ClientMail._repeated_paraList_codec);
			if (this.Time != 0L)
			{
				num += 1 + CodedOutputStream.ComputeInt64Size(this.Time);
			}
			if (this.Id != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Id);
			}
			if (this._unknownFields != null)
			{
				num += this._unknownFields.CalculateSize();
			}
			return num;
		}

		// Token: 0x060021D8 RID: 8664 RVA: 0x0005F9B4 File Offset: 0x0005DBB4
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(ClientMail other)
		{
			if (other == null)
			{
				return;
			}
			if (other.Content.Length != 0)
			{
				this.Content = other.Content;
			}
			if (other.ExpireTime != 0L)
			{
				this.ExpireTime = other.ExpireTime;
			}
			if (other.TemplateId != 0U)
			{
				this.TemplateId = other.TemplateId;
			}
			if (other.Title.Length != 0)
			{
				this.Title = other.Title;
			}
			if (other.attachment_ != null)
			{
				if (this.attachment_ == null)
				{
					this.Attachment = new ItemList();
				}
				this.Attachment.MergeFrom(other.Attachment);
			}
			if (other.IsRead)
			{
				this.IsRead = other.IsRead;
			}
			if (other.Sender.Length != 0)
			{
				this.Sender = other.Sender;
			}
			if (other.MailType != MailType.Normal)
			{
				this.MailType = other.MailType;
			}
			this.paraList_.Add(other.paraList_);
			if (other.Time != 0L)
			{
				this.Time = other.Time;
			}
			if (other.Id != 0U)
			{
				this.Id = other.Id;
			}
			this._unknownFields = UnknownFieldSet.MergeFrom(this._unknownFields, other._unknownFields);
		}

		// Token: 0x060021D9 RID: 8665 RVA: 0x0005FADC File Offset: 0x0005DCDC
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(CodedInputStream input)
		{
			input.ReadRawMessage(this);
		}

		// Token: 0x060021DA RID: 8666 RVA: 0x0005FAE8 File Offset: 0x0005DCE8
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalMergeFrom(ref ParseContext input)
		{
			uint num;
			while ((num = input.ReadTag()) != 0U)
			{
				if (num <= 66U)
				{
					if (num <= 32U)
					{
						if (num == 26U)
						{
							this.Content = input.ReadString();
							continue;
						}
						if (num == 32U)
						{
							this.Id = input.ReadUInt32();
							continue;
						}
					}
					else
					{
						if (num == 48U)
						{
							this.ExpireTime = input.ReadInt64();
							continue;
						}
						if (num == 58U)
						{
							this.paraList_.AddEntriesFrom(ref input, ClientMail._repeated_paraList_codec);
							continue;
						}
						if (num == 66U)
						{
							this.Title = input.ReadString();
							continue;
						}
					}
				}
				else if (num <= 90U)
				{
					if (num == 74U)
					{
						if (this.attachment_ == null)
						{
							this.Attachment = new ItemList();
						}
						input.ReadMessage(this.Attachment);
						continue;
					}
					if (num == 80U)
					{
						this.Time = input.ReadInt64();
						continue;
					}
					if (num == 90U)
					{
						this.Sender = input.ReadString();
						continue;
					}
				}
				else
				{
					if (num == 96U)
					{
						this.MailType = (MailType)input.ReadEnum();
						continue;
					}
					if (num == 104U)
					{
						this.TemplateId = input.ReadUInt32();
						continue;
					}
					if (num == 120U)
					{
						this.IsRead = input.ReadBool();
						continue;
					}
				}
				this._unknownFields = UnknownFieldSet.MergeFieldFrom(this._unknownFields, ref input);
			}
		}

		// Token: 0x04000DB9 RID: 3513
		private static readonly MessageParser<ClientMail> _parser = new MessageParser<ClientMail>(() => new ClientMail());

		// Token: 0x04000DBA RID: 3514
		private UnknownFieldSet _unknownFields;

		// Token: 0x04000DBB RID: 3515
		public const int ContentFieldNumber = 3;

		// Token: 0x04000DBC RID: 3516
		private string content_ = "";

		// Token: 0x04000DBD RID: 3517
		public const int ExpireTimeFieldNumber = 6;

		// Token: 0x04000DBE RID: 3518
		private long expireTime_;

		// Token: 0x04000DBF RID: 3519
		public const int TemplateIdFieldNumber = 13;

		// Token: 0x04000DC0 RID: 3520
		private uint templateId_;

		// Token: 0x04000DC1 RID: 3521
		public const int TitleFieldNumber = 8;

		// Token: 0x04000DC2 RID: 3522
		private string title_ = "";

		// Token: 0x04000DC3 RID: 3523
		public const int AttachmentFieldNumber = 9;

		// Token: 0x04000DC4 RID: 3524
		private ItemList attachment_;

		// Token: 0x04000DC5 RID: 3525
		public const int IsReadFieldNumber = 15;

		// Token: 0x04000DC6 RID: 3526
		private bool isRead_;

		// Token: 0x04000DC7 RID: 3527
		public const int SenderFieldNumber = 11;

		// Token: 0x04000DC8 RID: 3528
		private string sender_ = "";

		// Token: 0x04000DC9 RID: 3529
		public const int MailTypeFieldNumber = 12;

		// Token: 0x04000DCA RID: 3530
		private MailType mailType_;

		// Token: 0x04000DCB RID: 3531
		public const int ParaListFieldNumber = 7;

		// Token: 0x04000DCC RID: 3532
		private static readonly FieldCodec<string> _repeated_paraList_codec = FieldCodec.ForString(58U);

		// Token: 0x04000DCD RID: 3533
		private readonly RepeatedField<string> paraList_ = new RepeatedField<string>();

		// Token: 0x04000DCE RID: 3534
		public const int TimeFieldNumber = 10;

		// Token: 0x04000DCF RID: 3535
		private long time_;

		// Token: 0x04000DD0 RID: 3536
		public const int IdFieldNumber = 4;

		// Token: 0x04000DD1 RID: 3537
		private uint id_;
	}
}
